package com.ruoyi.teaching.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teaching.mapper.YaHolidayMapper;
import com.ruoyi.teaching.domain.YaHoliday;
import com.ruoyi.teaching.service.IYaHolidayService;

/**
 * 节假日Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-27
 */
@Service
public class YaHolidayServiceImpl implements IYaHolidayService 
{
    @Autowired
    private YaHolidayMapper yaHolidayMapper;

    /**
     * 查询节假日
     * 
     * @param id 节假日主键
     * @return 节假日
     */
    @Override
    public YaHoliday selectYaHolidayById(Long id)
    {
        return yaHolidayMapper.selectYaHolidayById(id);
    }

    /**
     * 查询节假日列表
     * 
     * @param yaHoliday 节假日
     * @return 节假日
     */
    @Override
    public List<YaHoliday> selectYaHolidayList(YaHoliday yaHoliday)
    {
        return yaHolidayMapper.selectYaHolidayList(yaHoliday);
    }

    /**
     * 新增节假日
     * 
     * @param yaHoliday 节假日
     * @return 结果
     */
    @Override
    public int insertYaHoliday(YaHoliday yaHoliday)
    {
        return yaHolidayMapper.insertYaHoliday(yaHoliday);
    }

    /**
     * 修改节假日
     * 
     * @param yaHoliday 节假日
     * @return 结果
     */
    @Override
    public int updateYaHoliday(YaHoliday yaHoliday)
    {
        return yaHolidayMapper.updateYaHoliday(yaHoliday);
    }

    /**
     * 批量删除节假日
     * 
     * @param ids 需要删除的节假日主键
     * @return 结果
     */
    @Override
    public int deleteYaHolidayByIds(Long[] ids)
    {
        return yaHolidayMapper.deleteYaHolidayByIds(ids);
    }

    /**
     * 删除节假日信息
     * 
     * @param id 节假日主键
     * @return 结果
     */
    @Override
    public int deleteYaHolidayById(Long id)
    {
        return yaHolidayMapper.deleteYaHolidayById(id);
    }
}
